import java.util.Arrays;

public class javaTest {
    public static void main(String[] args) {
        String s = "nihaofu220054070356";
        String s1 = s.replace("nihao","hi");
        System.out.println(s);
        System.out.println(s1);
        System.out.println(s.charAt(0));
        System.out.println(s.charAt(s.length()-1));
        int start = s.indexOf('h');
        int end = s.lastIndexOf('h');
        System.out.printf("start = %d,end = %d",start,end);
        System.out.println();
        char[] arr = s1.toCharArray();
        char tmp;
        for (int i = 0; i < s1.length()/2; i++) {
           tmp = arr[i];
           arr[i] = arr[s1.length()-1-i];
           arr[s1.length()-1-i] = tmp;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }
        System.out.println();
        System.out.println(s1.toUpperCase());
    }
}
